<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{klientBean.id}"/>
		<f:event type="preRenderView" listener="#{klientBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="View Klient"/>

	<ui:define name="header">
		Klient
	</ui:define>

	<ui:define name="subheader">
		View existing Klient
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:panelGrid columnClasses="label,component,required" columns="3">
			<h:outputLabel for="klientBeanKlientImie" value="Imie:"/>
			<h:outputText id="klientBeanKlientImie" value="#{klientBean.klient.imie}"/>
			<h:outputText/>
			<h:outputLabel for="klientBeanKlientNazwisko" value="Nazwisko:"/>
			<h:outputText id="klientBeanKlientNazwisko" value="#{klientBean.klient.nazwisko}"/>
			<h:outputText/>
			<h:outputLabel for="klientBeanKlientMiasto" value="Miasto:"/>
			<h:outputText id="klientBeanKlientMiasto" value="#{klientBean.klient.miasto}"/>
			<h:outputText/>
			<h:outputLabel for="klientBeanKlientUlica" value="Ulica:"/>
			<h:outputText id="klientBeanKlientUlica" value="#{klientBean.klient.ulica}"/>
			<h:outputText/>
			<h:outputLabel for="klientBeanKlientEmail" value="Email:"/>
			<h:outputText id="klientBeanKlientEmail" value="#{klientBean.klient.email}"/>
			<h:outputText/>
			<h:outputLabel for="klientBeanKlientUsers" value="Users:"/>
			<h:panelGrid columnClasses="label,component,required" columns="3" id="klientBeanKlientUsers" rendered="#{!empty klientBean.klient.users}">
				<h:outputLabel for="klientBeanKlientUsersUsername" value="Username:"/>
				<h:outputText id="klientBeanKlientUsersUsername" value="#{klientBean.klient.users.username}"/>
				<h:outputText/>
				<h:outputLabel for="klientBeanKlientUsersPassword" value="Password:"/>
				<h:outputText id="klientBeanKlientUsersPassword" value="#{klientBean.klient.users.password}"/>
				<h:outputText/>
			</h:panelGrid>
			<h:outputText/>
		</h:panelGrid>

		<div class="buttons">
			<h:link value="View All" outcome="search" styleClass="btn btn-primary"/> 
			<h:link value="Edit" outcome="create" includeViewParams="true" styleClass="btn btn-primary"/>
			<h:link value="Create New" outcome="create" styleClass="btn btn-primary"/>
		</div>
	</ui:define>

</ui:composition>